package com.tz.springmvc.sysmanage.entity;

import java.sql.Timestamp;
import java.util.Date;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Past;

import org.hibernate.validator.constraints.NotEmpty;
import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 跟数据库表M_USER表对应的实体类
 * @author Administrator
 *
 */
public class User implements java.io.Serializable {
	
	private static final long serialVersionUID = 7195902105451305867L;
	private Long userId;
	@NotNull(message="用户名称不能为空")
	private String userName;
	@NotEmpty(message="登陆名称不能为EMPTY")
	private String loginName;
	private String password;
	private Integer age;
	private Integer sex;
	
	private Long deptId;
	@DateTimeFormat(pattern="yyyy-MM-dd")
	@JsonFormat(pattern="yyyy-MM-dd")
	@Past(message = "当前输入的出生日期不可信")
	private Date birthday;
	private Date tvUpdate;
	public Long getUserId() {
		return userId;
	}
	public void setUserId(Long userId) {
		this.userId = userId;
	}
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
	public String getLoginName() {
		return loginName;
	}
	public void setLoginName(String loginName) {
		this.loginName = loginName;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public Integer getAge() {
		return age;
	}
	public void setAge(Integer age) {
		this.age = age;
	}
	public Integer getSex() {
		return sex;
	}
	public void setSex(Integer sex) {
		this.sex = sex;
	}
	public Long getDeptId() {
		return deptId;
	}
	public void setDeptId(Long deptId) {
		this.deptId = deptId;
	}
	public Date getBirthday() {
		return birthday;
	}
	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}
	public Date getTvUpdate() {
		return tvUpdate;
	}
	public void setTvUpdate(Date tvUpdate) {
		this.tvUpdate = tvUpdate;
	}
	
	 
}
